home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / DO1002.ARJ / DOIT.SCR < prev    next >
Text File  |  1991-12-29  |  2KB  |  47 lines

  1. .pg wi full clr
  2. /GOSUB DOHEADER
  3.     Executes DOS commands and programs.
  4.  
  5.     »cy«{flags}»#«             Optional flags that control the display
  6.                         during command execution:
  7.                         »ye«P»gr« = »wh«pause after execution»#«
  8.  
  9.     »cy«{command}»#«           The actual DOS command to be executed.
  10.                         »%t«DO»#« executes another shell to
  11.                         execute the command. Variables in
  12.                         »cy«{command}»#« will be expanded to their
  13.                         values before execution.
  14.  
  15.     »%t«DoIt»#« will swap as much of the »%t«DO»#« program out of memory as it
  16.     can before executing the command.  If you have »ye«EMS»#«, it will
  17.     do that, otherwise, it will create a »gr«swap file»#« on the current
  18.     directory.
  19.  
  20. .pg clr
  21.     We'll use the »cy«DOS "DIR/w"»#« command to illustrate the operation
  22.     of the »%t«DoIt»#« command.  Press »bo«<enter>»#« to execute each of
  23.     the commands after you have examined them.
  24. .pg clr
  25.     First a simple directory:
  26. .go 1 10
  27. |!DIR/w
  28. /GOSUB DOHEADER
  29.     That went by too fast to get a good look at. Let's use the
  30.     "»cy«P»#«" flag to pause the display before returning to the »%t«DO»#«
  31.     script.  Press »bo«<enter>»#« after viewing the directory.
  32. .go 1 10
  33. |!P;DIR/w
  34. /GOSUB DoHeader
  35.     That's better!
  36.  
  37. /GOTO DOEND
  38. :DOHEADER
  39. .wi full clr
  40.     »cy«COMMAND NAME»gy«: »%t«DoIt»ye«
  41.  
  42.     ![{flags};]{command}
  43. /CW
  44. /RETURN
  45. :DOEND
  46. /ENDEXEC CLEAR
  47.